package steampunk.geom;

import java.awt.Rectangle;

/**
 * Defines an object which is bounded by a rectangle
 * @author garrett
 *
 */
public interface Boundable {
	/** Get the left edge */
	public int left();
	/** Get the right edge */
	public int right();
	/** Get the top edge */
	public int top();
	/** Get the bottom edge */
	public int bottom();
	
	/** Set the left edge */
	public void left(int x);
	/** Sets the right edge */
	public void right(int x);
	/** Sets the top edge */
	public void top(int y);
	/** Sets the bottom edge */
	public void bottom(int y);
	
	/** Get the horizontal center */
	public int centerX();
	/** Get the vertical center */
	public int centerY();
	
	/** Sets the horizontal center */
	public int centerX(int x);
	/** Sets the vertical center */
	public int centerY(int y);
	
	/** Get the width */
	public int width();
	/** Get the height */
	public int height();
	
	/** Sets the width */
	public void width(int w);
	/** Sets the height */
	public void height(int h);
	
	/**
	 * Returns a java.awt.Rectangle representing these bounds. If possible,
	 * you should probably use the left(), right(), top(), etc functions instead,
	 * as this function may be creating new Rectangles on the fly depending
	 * on how it's implemented. This may be undesirable if it is used lots
	 * of times, because creating objects takes longer than just working with
	 * primitives.
	 * @return java.awt.Rectangle
	 */
	public Rectangle bounds();
}
